-- avalon_addon
-- create by zhuangsl
-- 冈布奥提升阿瓦隆巨炮某种属性

return {
    apply = function(prop, baseValue)
        return baseValue + prop[3];
    end,

    desc = function(prop)
        local row = PropM.getRow(prop[1]);
        local desc = row.desc;

        local attrib;
        if "attack" == prop[2] then
            attrib = getLocStr("avalon_attack");
        else
            attrib = FieldsM.getFieldName(prop[2]);
        end

        desc = string.gsub(desc, "{0}", attrib);
        desc = string.gsub(desc, "{1}", prop[3]);

        return desc;
    end,

    record = function(target, prop, path)
        return false;
    end
};
